home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Medal Software 2
/
Gold Medal Software Volume 2 (Gold Medal) (1994).iso
/
prog
/
rkplus31.arj
/
RKP3ENC.DOC
< prev
next >
Wrap
Text File
|
1993-06-15
|
10KB
|
269 lines
▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄
█ █ █ █
█▄▄▄▄▄█ ▄ ▄▄ ▄▄▄▄ ▄▄▄█ █▄▄ ▄▄▄ ▄ ▄▄▄▄
█ █ █▄█▄ █▄▄█ █ █ █ █ █ █
█ █▄▄ █ █ █ ▄▄▄▄▄▄█ █▄▄▄▄▄▄ █ █▄█ █▄▄▄
RkPlus (tm) 3.x/compatible Encode Unit for RkPlus 3.0
by C. Scott Davis
Copyright (c) 1993 Serious Cybernetics
Rkp3Enc - RkPlus (tm) 3.x/compatible Encode Unit for RkPlus 3.0 Page i
T A B L E O F C O N T E N T S
═══════════════════════════════════════════════════════════════════
Sec D e s c r i p t i o n Page
Table of Contents .................................. i
1.0 What Is Rkp3Enc? ................................... 1
2.0 Using Rkp3Enc ...................................... 1
3.0 Rkp3Enc Procedures ................................. 1
3.1 SetOwnerCode ....................................... 2
3.2 SetProgCode ........................................ 3
3.3 SetVerCode ......................................... 4
4.0 Additional Information On Rkp3Enc .................. 5
5.0 Copyright Notices .................................. 5
6.0 Index .............................................. 6
Rkp3Enc - RkPlus (tm) 3.x/compatible Encode Unit for RkPlus 3.0 Page 1
1.0 - What is Rkp3Enc?
Rkp3Enc is a Turbo Pascal (tm) unit that allows RkPlus 3.0 to generate and use
version 3.x/compatible keys. It contains definitions for SetOwnerCode,
SetProgCode, and SetVerCode, as well as new encoding functions for RkPlus 3.x.
If version 2.x/compatible keys are required, Rkp2Enc should be used instead; or
for additional security, user-written encoding functions may be defined (see
RKPLUS.DOC for more information).
2.0 - Using Rkp3Enc
To use Rkp3Enc, the programmer must place it AFTER RkPlus in the Uses
definition (as shown below).
Uses
RkPlus, Rkp3Enc;
In addition, SetOwnerCode, SetProgCode and SetVerCode must be called, before
any RkPlus calls are made (otherwise the RkPlus function RkpError will return
InvalidParameter). No other procedure or function calls are needed, as Rkp2Enc
is automatically activated when it is Used.
If Rkp3Enc is corrupt or has been tampered with, the RkPlus function RkpError
will return BadTPU. If the RkPlus 3.0 version of Rkp3Enc is used with any
version other than 3.0, the RkPlus function RkpError will return
VersionMismatch.
3.0 - Rkp3Enc Procedures
The following Procedures are defined in Rkp3Enc:
SetOwnerCode
SetProgCode
SetVerCode
Rkp3Enc - RkPlus (tm) 3.x/compatible Encode Unit for RkPlus 3.0 Page 2
3.1 - SetOwnerCode
┌──────────────────────────────────────────┐
│ Procedure SetOwnerCode(Var v; b : Byte); │
└──────────────────────────────────────────┘
This procedure must be called before any of the RkPlus procedures or functions.
The variable v may be of any type, and b specifies the length of v (up to 255
bytes). The variable passed as v is used (along with the variables passed to
SetProgCode and SetVerCode) to generate the registration keys. This variable
should probably be the same for all software written by a single
person/company. Since is it used to cause your keys to be different from those
of other programmers who are also using RkPlus, the more cryptic this variable
is, the more secure your keys will be.
Examples :
┌───────────────────────────────┐
│ Var │
│ s : String[30]; │
│ │
│ │
│ s := 'Read$Make@Into'; │
│ SetOwnerCode(s[1],Length(s)); │
└───────────────────────────────┘
Note that when the variable passed to SetOwnerCode is a string, the first
character of the string should be passed (rather than the string itself) and
the length should be the length of the string (Length) and not the size
(SizeOf). This is to avoid having the length byte and the "garbage" bytes at
the end of a Pascal string used in the key encryption.
┌─────────────────────────────────┐
│ Var │
│ a : Array[1 to 5] of LongInt; │
│ │
│ │
│ a[1] := $3C1F29EC; │
│ a[2] := $A446B902; │
│ a[3] := $6C568DA0; │
│ a[4] := $0B197E23; │
│ a[5] := $F8F501C7; │
│ SetOwnerCode(a,SizeOf(a)); │
└─────────────────────────────────┘
IMPORTANT : You should NOT use any of the actual examples used here or in the
sample programmes included with RkPlus. If you do, anyone else who uses the
same example will have IDENTICAL keys!
Rkp3Enc - RkPlus (tm) 3.x/compatible Encode Unit for RkPlus 3.0 Page 3
3.2 - SetProgCode
┌─────────────────────────────────────────┐
│ Procedure SetProgCode(Var v; b : Byte); │
└─────────────────────────────────────────┘
This procedure must be called before any of the RkPlus procedures or functions.
The variable v may be of any type, and b specifies the length of v (up to 255
bytes). The variable passed as v is used (along with the variables passed to
SetOwnerCode and SetVerCode) to generate the registration keys. Unlike the
variable passed to SetOwnerCode, this variable doesn't need to be particularly
cryptic.
Examples :
┌──────────────────────────────┐
│ Var │
│ s : String[15]; │
│ │
│ │
│ s := 'RkStuff'; │
│ SetProgCode(s[1],Length(s)); │
└──────────────────────────────┘
If you wrote a programme called RkSample and a programme called RkUtils and you
passed 'RkStuff' to SetProgCode in both programmes, a key for one programme
would work for the other (assuming that SetOwnerCode and SetVerCode were also
passed the same values in both programmes).
┌──────────────────────────────┐
│ Var │
│ t : String[10]; │
│ │
│ │
│ t := 'RkSample'; │
│ SetProgCode(t[1],Length(t)); │
└──────────────────────────────┘
If you wrote a programme called RkSample and a programme called RkUtils and you
passed 'RkSample' to SetProgCode in RkSample and passed a different value to
SetProgCode in RkUtils, a key for one would NOT work for the other.
Rkp3Enc - RkPlus (tm) 3.x/compatible Encode Unit for RkPlus 3.0 Page 4
3.3 - SetVerCode
┌────────────────────────────────────────┐
│ Procedure SetVerCode(Var v; b : Byte); │
└────────────────────────────────────────┘
This procedure must be called before any of the RkPlus procedures or functions.
The variable v may be of any type, and b specifies the length of v (up to 255
bytes). The variable passed as v is used (along with the variables passed to
SetOwnerCode and SetProgCode) to generate the registration keys. Unlike the
variable passed to SetOwnerCode, this variable doesn't need to be cryptic at
all.
Examples :
┌───────────────────────────┐
│ Var │
│ c : Char; │
│ │
│ │
│ c := '2'; │
│ SetProgCode(c,SizeOf(c)); │
└───────────────────────────┘
If you wrote a programme and passed '2' to SetVerCode in versions 2.0, 2.1 and
2.2 of the programme; and passed '3' to SetVerCode in version 3.0, the same
key would work for versions 2.x (assuming that SetOwnerCode and SetVerCode were
passed the same values in all versions), but version 3.0 would require a
different key.
┌───────────────────────────┐
│ Var │
│ r : Record │
│ v : Byte; │
│ u : Byte; │
│ End; │
│ │
│ │
│ r.v := 1; │
│ r.u := 0; │
│ SetProgCode(r,SizeOf(r)); │
└───────────────────────────┘
If you wrote a programme and passed r to SetProgCode with r.v set to the major
version and r.u set to the minor update, a key for one version would NOT work
for another.
Rkp3Enc - RkPlus (tm) 3.x/compatible Encode Unit for RkPlus 3.0 Page 5
4.0 - Additional Information On Rkp3Enc
For more information on using Rkp3Enc, see the sample Turbo Pascal (tm)
programmes (RKPDEMO3.ZIP) that are distributed with RkPlus, or contact me at
any of the locations listed in RKPLUS.DOC.
5.0 - Copyright Notices
RkPlus (c) 1991-93 Serious Cybernetics
Rkp2Enc (c) 1990-93 Serious Cybernetics
Rkp3Enc (c) 1993 Serious Cybernetics
Turbo Pascal (c) 1983-89 Borland International
Rkp3Enc - RkPlus (tm) 3.x/compatible Encode Unit for RkPlus 3.0 Page 6
6.0 - Index
D e s c r i p t i o n Page
------------------------------------------------------- ----
BadTPU ................................................... 1
InvalidParameter ......................................... 1
Procedure List ........................................... 1
RkpError ................................................. 1
Rkp3Enc .................................................. 1
SetProgCode .............................................. 2
SetOwnerCode ............................................. 3
SetVerCode ............................................... 4
Using Rkp3Enc ............................................ 1
VersionMismatch .......................................... 1